<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 * 
 * @desc {cosmo_ajax_init [context="<actual_page>"]} 
 * 		Initiate ajax object manager for the current
 */
 
function smarty_function_cosmo_js_get_file($params, &$smarty){
	// check parameters
	if(!isset($params['file'])) 
		return '';
	
	$loader = Loader::getInstance() ;
	$loader->helper('javascript') ;
	unset($loader) ; // free memory
	return javascript_getFile($params['file']);	
}

?>